﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _51DataValidation
{
    public class Student
    {
        private int _age;
        public int Age
        {
            get { return _age; }
            set
        {
            if (value < 50)
            {
                throw new Exception("Student's age must not be greater than 50 or less than 10");
            }
            _age=value;
        }
        }
    }
}
